// 例子25

{
    const result1 = [1, 5, 10, 15].find((value, index, arr) => value > 9);
    console.log(result1); // 10

    const result2 = [1, 5, 10, 15].findIndex((value, index, arr) => value > 9);
    console.log(result2); // 2
}

console.log('----------------------------------');

{
    function f(v){
        return v > this.age;
    }
    let person = {name: 'John', age: 20};
    console.log([10, 12, 26, 15].find(f, person));    // 26
}